import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { OverlayModule } from '@angular/cdk/overlay';
import { IconModule } from '../icon/api';
import { CheckboxModule } from '../checkbox/api';
import { I18NModule, OverlayService } from '../core/api';
import { SelectTriggerIconModule } from '../core/select-trigger-icon/api';
import { InternalSelectTriggerModule } from '../core/internal-select-trigger/api';
import { SearchModule } from '../search/api';
import { OverflowModule } from '../overflow/api';
import { TooltipModule } from '../tooltip/api';
import { HighlightModule } from '../highlight/api';
import { EmptyModule } from '../empty/api';
import { ButtonModule } from '../button/button.module';
import { InputModule } from '../input/input.module';
import { SelectFooterComponent } from './select-footer.component';
import { SelectHeaderComponent } from './select-header.component';
import { SelectTriggerComponent } from './select-trigger.component';
import { SelectionComponent } from './selection.component';
import { SubSelectComponent } from './sub-select.component';
import { OptGroupComponent } from './opt-group.component';
import { OptionComponent } from './option.component';
import { SelectComponent } from './select.component';

const COMPONENTS = [
  SelectComponent,
  OptionComponent,
  SubSelectComponent,
  SelectionComponent,
  OptGroupComponent,
  SelectTriggerComponent,
  SelectHeaderComponent,
  SelectFooterComponent,
];
@NgModule({
  declarations: [...COMPONENTS],
  imports: [
    CommonModule,
    FormsModule,
    CheckboxModule,
    IconModule,
    OverlayModule,
    I18NModule,
    ReactiveFormsModule,
    SearchModule,
    OverflowModule,
    TooltipModule,
    HighlightModule,
    EmptyModule,
    SelectTriggerIconModule,
    InternalSelectTriggerModule,
    ButtonModule,
    InputModule,
  ],
  exports: [...COMPONENTS],
  providers: [OverlayService],
})
export class SelectModule {}
